import axios from 'axios';
var qs=require('qs');
let base='' ;



//教师登陆
export const requestLogin = params => { return axios.post('/api/teacher/login', qs.stringify(params)).then(res => res.data); };

//修改密码
export const  modfiyPwd = params => { return axios.post('/api/teacher/modfiyPwd', qs.stringify(params)).then(res => res.data); };
//教师退出
export const  logout = params => { return axios.post('/api/teacher/logout', qs.stringify(params)).then(res => res.data); };

//导学资源管理
//查看所有
export const coursewareList= params => { return axios.post('/api/teacher/courseware/list', qs.stringify(params)).then(res => res.data); };
//上传ppt
export const coursewareInsert= params => { return axios.post('/api/teacher/courseware/insert', qs.stringify(params)).then(res => res.data); };
//删除
export const coursewareDelete= params => { return axios.post('/api/teacher/courseware/delete', qs.stringify(params)).then(res => res.data); };

//教师端主页
export const noticeList= params => { return axios.post('/api/teacher/notice/list', qs.stringify(params)).then(res => res.data); };
//根据id查看公告内容
export const getNoticeById= params => { return axios.post('/api/teacher/notice/getNoticeById', qs.stringify(params)).then(res => res.data); };

//题库
//查看所有
export const storeGet= params => { return axios.post('/api/teacher/courseware/store/get', qs.stringify(params)).then(res => res.data); };
//添加判断题
export const judgeInsert= params => { return axios.post('/api/teacher/courseware/judge/insert', qs.stringify(params)).then(res => res.data); };
//添加选择题
export const selectInsert= params => { return axios.post('/api/teacher/courseware/select/insert',qs.stringify(params)).then(res => res.data); };
//修改判断题
export const judgeUpdate= params => { return axios.post('/api/teacher/courseware/judge/update', qs.stringify(params)).then(res => res.data); };
//修改选择题
export const selectUpdate= params => { return axios.post('/api/teacher/courseware/select/update',qs.stringify(params)).then(res => res.data); };
//删除选择题
export const judgeDelete= params => { return axios.post('/api/teacher/courseware/judge/delete', qs.stringify(params)).then(res => res.data); };
//删除选择题
export const selectDelete= params => { return axios.post('/api/teacher/courseware/select/delete', qs.stringify(params)).then(res => res.data); };


//成绩管理
//查看所有
export const scoreList= params => { return axios.post('/api/teacher/score/getAllListScore', qs.stringify(params)).then(res => res.data); };
//按照ID查詢
export const scoreIdName= params => { return axios.post('/api/teacher/score/selectIdName', qs.stringify(params)).then(res => res.data); };
//增加
export const scoreInsert= params => { return axios.post('/api/teacher/score/insertSelective', qs.stringify(params)).then(res => res.data); };
//修改
export const scoreUpdate= params => { return axios.post('/api/teacher/score/updateByPrimaryKey', qs.stringify(params)).then(res => res.data); };


//考试管理
//查看所有
export const examList= params => { return axios.post('/api/teacher/exam/getlist', qs.stringify(params)).then(res => res.data); };
//添加
export const examInsert= params => { return axios.post('/api/teacher/exam/insert', qs.stringify(params)).then(res => res.data); };
//删除
export const examDelete= params => { return axios.post('/api/teacher/exam/delete', qs.stringify(params)).then(res => res.data); };


//课程通知
//查看所有
export const courseInformList= params => { return axios.post('/api/teacher/courseInform/getlist',qs.stringify(params)).then(res => res.data); };
//添加
export const courseInformInsert= params => { return axios.post('/api/teacher/courseInform/insert',qs.stringify(params)).then(res => res.data); };
//删除
export const lcourseInformDelete= params => { return axios.post('/api/teacher/courseInform/delete',qs.stringify(params)).then(res => res.data); };


//章节管理
//显示章节和小节
export const sectionList= params => { return axios.post('/api/teacher/section/list', qs.stringify(params)).then(res => res.data); };
//添加
export const sectionInsert= params => { return axios.post('/api/teacher/section/insert',qs.stringify(params)).then(res => res.data); };
//修改
export const sectionUpdate= params => { return axios.post('/api/teacher/section/update', qs.stringify(params)).then(res => res.data); };


//小节管理
//上传视频
export const videoInsert= params => { return axios.post('/api/teacher/video/insert',qs.stringify(params)).then(res => res.data); };
//修改视频
export const videoUpdate= params => { return axios.post('/api/teacher/video/update', qs.stringify(params)).then(res => res.data); };
//添加小节
export const partSectionInsert= params => { return axios.post('/api/teacher/partsection/insert', qs.stringify(params)).then(res => res.data); };
//修改小节
export const partSectionUpdate= params => { return axios.post('/api/teacher/partsection/update', qs.stringify(params)).then(res => res.data); };
//删除小节
export const partSectionDelete= params => { return axios.post('/api/teacher/partsection/delete', qs.stringify(params)).then(res => res.data); };

